#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
	int t; cin >> t;
	while (t--) {
		ll a, b, c; cin >> a >> b >> c;
		if (a + b >= 10 || a + c >= 10 || b + c >= 10) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}